export default [
  {
    path: '/ruleEngine',
    icon: 'RetweetOutlined',
    name: '规则引擎',
    routes: [
      { path: '/ruleEngine', redirect: '/ruleEngine/sceneLinkage' },
      {
        path: '/ruleEngine/sceneLinkage',
        icon: 'smile',
        component: './ruleEngine/SceneLinkage',
        name: '场景联动',
        exact: true,
      },
      {
        // 配置详情页面
        path: '/ruleEngine/sceneLinkage/SceneSave',
        icon: 'smile',
        component: './ruleEngine/SceneLinkage/SceneSave',
        name: '详情',
        hideInMenu: true, //隐藏左侧菜单
        exact: true,
      },
    ],
  },
  {
    path: '/technology',
    icon: 'SplitCellsOutlined',
    name: '工艺管理',
    routes: [
      { path: '/technology', redirect: '/technology/technologyRoute' },
      {
        path: '/technology/technologyRoute',
        icon: 'smile',
        component: './technology/technologyRoute',
        name: '工艺路线',
        exact: true,
      },
      {
        // 配置详情页面
        path: '/technology/technologyRoute/technologyRouteSave',
        icon: 'smile',
        component: './technology/technologyRoute/technologyRouteSave',
        name: '添加',
        hideInMenu: true, //隐藏左侧菜单
        exact: true,
      },
    ],
  },
  {
    path: '/user',
    layout: false,
    routes: [{ path: '/user/login', component: './User/Login', name: '登录' }],
  },
  {
    path: '/tenant',
    layout: false,
    routes: [{ path: '/tenant', component: './Tenant', name: '租户' }],
  },
  {
    icon: 'ClusterOutlined',
    path: '/deviceAdmin',
    name: '设备管理',
    routes: [
      { path: '/deviceAdmin', redirect: '/deviceAdmin/Device' },
      { path: '/deviceAdmin/device', component: './deviceAdmin/Device', name: '设备' },
      { path: '/deviceAdmin/DeviceType', component: './deviceAdmin/DeviceType', name: '设备类型' },
      {
        path: '/deviceAdmin/DeviceAssignments',
        component: './deviceAdmin/DeviceAssignments',
        name: '设备分配',
      },
      {
        path: '/deviceAdmin/Loudspeaker',
        component: './deviceAdmin/Loudspeaker',
        name: '功放管理',
      },
      {
        // 配置详情页面
        path: '/deviceAdmin/device/deviceDetails',
        icon: 'smile',
        component: './deviceAdmin/Device/DeviceDetails',
        name: '详情',
        hideInMenu: true, //隐藏左侧菜单
        exact: true,
      },
    ],
  },
  {
    icon: 'DeploymentUnitOutlined',
    path: '/areaPage',
    name: '站点管理',
    routes: [
      { path: '/areaPage', redirect: '/areaPage/AreaType' },
      { path: '/areaPage/areaType', component: './areaPage/AreaType', name: '站点类型' },
      { path: '/areaPage/Area', component: './areaPage/Area', name: '站点' },
      {
        // 配置详情页面
        path: '/areaPage/areaType/areaTypeDetails/:areaToken',
        icon: 'smile',
        component: './areaPage/AreaType/AreaTypeDetails',
        name: '详情',
        hideInMenu: true, //隐藏左侧菜单
      },
    ],
  },
  {
    icon: 'GlobalOutlined',
    path: '/gatewayPage',
    name: '网关管理',
    routes: [
      { path: '/gatewayPage', redirect: '/gatewayPage/gatewayType' },
      {
        path: '/gatewayPage/gatewayType',
        component: './gatewayPage/GatewayType',
        name: '网关类型',
      },
      { path: '/gatewayPage/gateway', component: './gatewayPage/Gateway', name: '网关' },
    ],
  },
  {
    icon: 'SettingOutlined',
    path: '/system',
    name: '系统管理',
    routes: [
      { path: '/system', redirect: '/system/users' },
      {
        path: '/system/users',
        component: './system/Users',
        name: '用户',
      },
      {
        path: '/system/department',
        component: './system/Department',
        name: '部门',
      },
      {
        path: '/system/menuPage',
        component: './system/MenuPage',
        name: '菜单',
      },
      {
        path: '/system/resourcesPage',
        component: './system/ResourcesPage',
        name: '资源',
      },
    ],
  },
  // 默认路由直接指向该路由,而不是该路由的父路由
  { path: '/', redirect: '/ruleEngine/sceneLinkage' },
  { path: '*', layout: false, component: './404' },
];
